package string;

public class ChatAtDemo {
    public static void main(String[] args) {
       /* //01234567890
        String  str = "www.ffzm10.com";
        char a = str.charAt(2);
        System.out.println(a);

        for (int i=0 ;i<str.length();i++){
            a = str.charAt(i);
            System.out.println(a);
        }*/

        String line = "上海自来水来自海上";
        for (int i = 0; i < line.length() / 2; i++) {
            char c1 = line.charAt(i);
            char c2 = line.charAt(line.length() - 1 - i);
            if (c1 != c2) {
                System.out.print("不");
                break;
            }
        }
        System.out.println("是回文");
    }
}

